\name{Geometry2Sp}
\alias{Geometry2Sp}
%- Also NEED an '\alias' for EACH other topic documented here.
\encoding{UTF-8}
\title{
SuperMap Geometry objects (collections) are transformed into spatial geometric objects of sp
}
\description{
可以将 SuperMap 空间几何对象（GeoPoint、GeoLine 和 GeoRegion）转换 sp 的 SpatialPoints、SpatialLines 和 SpatialPolygons。
}
\usage{
Geometry2Sp(obj)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
  \item{obj}{
  SuperMap 空间几何对象（集合），可以为 GeoPoint、GeoLine 和 GeoRegion。如果是一个 list ，则 list 中必须为同一类型的几何对象，比如，只能是 GeoPoint 或 只能 GeoRegion，不能同时含有两种几何对象。
}
}
\details{
%%  ~~ If necessary, more details than the description above ~~
}
\value{
如果是 SuperMap 点对象，则返回 SpatialPoints 对象。
如果是 SuperMap 线对象，则返回 SpatialLines 对象。
如果是 SuperMap 面对象，则返回 SpatialPolygons 对象。
}
\references{
%% ~put references to the literature/web site here ~
}
\author{
%%  ~~who you are~~
}
\note{
%%  ~~further notes~~
}

%% ~Make other sections like Warning with \section{Warning }{....} ~

\seealso{
\code{\link{Sp2Geometry}}
}
\examples{

require(sp)

pnt1 <- CreatePoint(10,20)
pnt2 <- CreatePoint(10,30)
pnt3 <- CreatePoint(20,20)
geo.pnts <- list(pnt1, pnt2, pnt3)
sp.pnt <- Geometry2Sp(geo.pnts)

pnts <- matrix(data=1:20, nrow=10, ncol=2)
line <- CreateLine(pnts, c(10))
sp.line <- Geometry2Sp(line)

ps2 <- matrix(nrow = 15, ncol = 2)
xs2 <- c(10,20,20,10,10,110,120,120,110,110,110,120,120,110,110)
ys2 <- c(10,10,20,20,10,10,10,20,20,10,110,110,120,120,110)
ps2[,1] <- xs2
ps2[,2] <- ys2
geo3 <- CreateRegion(ps2, c(5,5,5))
sp.polygon <- Geometry2Sp(geo3)

}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
\keyword{ supermap }% use one of  RShowDoc("KEYWORDS")
